<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″/>
    <link rel="stylesheet" type="text/css" href="../../css/defaultcss.css" />
    <link rel="stylesheet" type="text/css" href="../../css/amazeui.min.css" />
    <script type="text/javascript" src="../../js/jquery-1.9.1.min.js"></script>
    <script src='../../js/amazeui.min.js'></script>
    <script src='../../js/flex.js'></script>
    <script type="text/javascript" src="../../layer/layer.js"></script>
    <script type="text/javascript" src="../../js/index.js"></script>
    <link rel="stylesheet" href="../../css/weui.min.css">
    <link rel="stylesheet" href="../../css/css/stylesheets/index.css">
</head>

<body style="background:#fff;">
    <header>
        <div class="goBack">
            <img src="../../img/base/back.png" alt="返回">
        </div>
        <span class="title"> 动态详情 </span>
    </header>
    <div class="content  state_detail">
        <div class="detail_box">
            <div class="title" id="name">
            </div>
            <div class="date" id="createTime">
            </div>
            <div class="line">
            </div>
            <div class="msg" id="detail">
            </div>
            <div class="file">
                <div class="title">
                    <span class="icon"></span>
                    <span class="title1">
                        附件
                    </span>
                </div>
                <ul class="file_list" id="file_list">
                </ul>
            </div>
        </div>
    </div>

</body>

</html>

<script type="text/javascript ">
    $('.goBack').bind('click', function () {
        window.history.back()
    })
    var getData = function (id) {
        HYIP.ajax({
            url: '/twoLaw/queryNotice.action',
            type: 'get',
            data: {
                id: id
            }
        }, function (data) {
            var detail = data.data;
            $('#name').text(detail.name);
            $('#createTime').text(detail.createTime);
            $('#detail').text(detail.detail);
            var fileList = detail.fileList;
            var file_list = ''
            for (var k = 0; k < fileList.length; k++) {
                file_list += '<li>                                          ' +
                    fileList[k].fileName +
                    '</li>                                         '
                $("#file_list").append(file_list);
            }
        });
    }

    function GetRequest() {
        var url = location.search; //获取url中"?"符后的字串
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for (var i = 0; i < strs.length; i++) {
                theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
            }
        }
        return theRequest;
    }
    getData(GetRequest()['id']);
    console.log(GetRequest()['id'])
</script>